<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Image
 *
 * @author paulaan
 */

namespace Vietland\AdsBundle\Document;

use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;

/**
 * @MongoDB\Document(db="esite")
 */
class Avatar {

    /** @MongoDB\Id(strategy="increment") */
    private $id;

    /** @MongoDB\Field */
    private $ext;

    /** @MongoDB\File */
    private $file;

    /** @MongoDB\Field */
    private $uploadDate;

    /** @MongoDB\Field */
    private $length;

    /** @MongoDB\Field */
    private $chunkSize;

    /** @MongoDB\Field */
    private $md5;

    /**
     * @MongoDB\Field
     */
    private $contentType;


    /**
     * @MongoDB\ReferenceOne(targetDocument="Vietland\UserBundle\Document\User", inversedBy="user")
     */
    protected $user;
    
    /**
     * @MongoDB\Int
     */
    private $size;
    
    const AVATAR_SMALL = 1;
    const AVATAR_LARGE = 0;

    public function getId() {
        return $this->id;
    }

    public function setExt($name) {
        $this->ext = $name;
    }

    public function getExt() {
        return $this->ext;
    }

    public function getContentType() {
        return $this->contentType;
    }

    public function setContentType($contentType) {
        $this->contentType = $contentType;
    }
    
    public function getFile() {
        return $this->file;
    }

    public function setFile($file) {
        $this->file = $file;
    }
    
    public function getUser() {
        return $this->user;
    }

    public function setUser($user) {
        $this->user = $user;
    }

    public function getSize() {
        return $this->size;
    }

    public function setSize($size) {
        $this->size = $size;
    }



}